package com.mzkj.wanjulaile.mobile.api.modules.coupon.entity;

import com.mzkj.common.utils.DateUtils;
import com.mzkj.wanjulaile.mobile.api.common.entity.DataEntity;
import com.mzkj.wanjulaile.mobile.api.modules.account.entity.Account;

import java.util.Date;

/**
 * 会员优惠券Entity
 *
 * @author hgw
 * @version 2016-11-11
 */
public class AccountCoupon extends DataEntity<AccountCoupon> {

    private static final long serialVersionUID = 1L;
    private Account account;        // 会员id
    private Coupon coupon;        // 优惠券id
    private int count;        // 优惠券数量
    private int type;	//会员优惠券类型 0普通 1:邀请获得 2：被邀请获得
    private int totalNum; // 账号下优惠券总数

    private Date expireDate; //过期时间

    private Date minExpireDate; //账号下最近过期时间

//	private String delFlag; //0:可使用 1:已使用 2:已过期

    //微信端使用
    private String createDateStr;
    private String expireDateStr;


    public AccountCoupon() {
        super();
    }

    public AccountCoupon(String id) {
        super(id);
    }

    public Account getAccount() {
        return account;
    }

    public void setAccount(Account account) {
        this.account = account;
    }

    public Coupon getCoupon() {
        return coupon;
    }

    public void setCoupon(Coupon coupon) {
        this.coupon = coupon;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public Date getExpireDate() {
        return expireDate;
    }

    public void setExpireDate(Date expireDate) {
        this.expireDate = expireDate;
    }

    public String getCreateDateStr() {
        return this.createDate == null ? null : DateUtils.formatDate(this.createDate, "yyyy/MM/dd");
    }

    public void setCreateDateStr(String createDateStr) {
        this.createDateStr = createDateStr;
    }

    public String getExpireDateStr() {
        return this.expireDate == null ? null : DateUtils.formatDate(this.expireDate, "yyyy/MM/dd");
    }

    public void setExpireDateStr(String expireDateStr) {
        this.expireDateStr = expireDateStr;
    }

    public Date getMinExpireDate() {
        return minExpireDate;
    }

    public void setMinExpireDate(Date minExpireDate) {
        this.minExpireDate = minExpireDate;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getTotalNum() {
        return totalNum;
    }

    public void setTotalNum(int totalNum) {
        this.totalNum = totalNum;
    }
}